//
//  DevChartModel.h
//  RuiHeApp
//
//  Created by Jun on 2022/11/24.
//

#import "BaseModel.h"

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, DevChartTimeType) {
    TimeType_Day                   = 0, // day
    TimeType_Month                 = 1, // month
    TimeType_Year                  = 2, // year
    TimeType_Total                 = 3, // total
};

@class ChartYAxisModel;

@interface DevChartModel : BaseModel
@property (nonatomic, copy) NSString *title;
//时间类型
@property (nonatomic ,assign) DevChartTimeType timeType;
//选中时间
@property (nonatomic ,copy) NSString *curTime;
//曲线参数
@property (nonatomic ,copy) NSArray *params;
//日参数
@property (nonatomic ,copy) NSArray *dayParams;
//月参数
@property (nonatomic ,copy) NSArray *monthParams;
//年参数
@property (nonatomic ,copy) NSArray *yearParams;
//曲线最大选择个数  默认6条
@property (nonatomic ,assign) NSInteger maxSelectCount;

//展示曲线类型
@property (nonatomic ,strong) NSMutableArray *selectArray;
//设备上报原始数据
@property (nonatomic ,strong) NSArray *allDataArray;
//年月原始数据
@property (nonatomic ,copy) NSArray *mYDataArray;

//x轴标签
@property (nonatomic ,strong) NSArray *xTitlesArray;
//y轴标签组合
@property (nonatomic ,copy) NSArray<ChartYAxisModel *> *yAxisArray;
//是否允许缩放
@property (nonatomic,assign) BOOL isAllowScale;

@property (nonatomic ,assign) NSInteger y1_min;

@property (nonatomic ,assign) NSInteger y1_max;

@property (nonatomic ,copy) NSString *y1_unit;

@property (nonatomic ,assign) NSInteger y2_min;

@property (nonatomic ,assign) NSInteger y2_max;

@property (nonatomic ,copy) NSString *y2_unit;

@property (nonatomic ,strong) NSArray *colorArr;//第个图表里各个曲线的颜色
//更新Y轴标签组合
- (void)updateyAxisArray;

//为了让图表显示,造点假数据
-(void)creatDefaultChartDataWithChartModel;

///测试数据
-(NSArray*)getTestData;

-(DevChartModel*)modelCopy;
@end

NS_ASSUME_NONNULL_END
